<html>
<head>
<title>GalaxyNativeFix</title>
</head>
<body>
<textarea id="src" cols="80" rows="40"></textarea>
<button onclick="test()">test</button>
<script type="text/javascript">
function test(){
	var src = document.getElementById('src');
	src.value = src.value.replace(/\(([^)]*)\)/g, function (m, p){
		if (!/^\s*$/.test(p)) {
			p = p.split(',');
			for (var i=0; i<p.length; i++) {
				p[i] += 'p'+i;
			}
			p = p.join(',');
		}
		return '(' + p + ')';
	});
}
</script>
</body>
</html>